import Vue from 'vue'
import VueRouter from 'vue-router'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
const HelloWorld = () => import('@/components/HelloWorld')
Vue.use(Router)
const routes = [
      {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
      },
]
const router = new VueRouter({
  // mode:'history', //路由模式,默认hash
  // base:'/',
  routes
})
export default router
// export default new Router({
//   mode:'history', //路由模式,默认hash
//   path:'/',
//   routes: [
//     {
//       path: '/',
//       name: 'HelloWorld',
//       component: ()=>import('@/components/HelloWorld')
//     },
//   ]
// })
